package com.example.design.dahua.chainofresponsibility.new3;

/**
 * @author ebnew
 * 定义一个处理请示的接口
 */
public abstract class AbstractHandler {
    protected AbstractHandler successor;

    /**
     * 设置继任者
     *
     * @param successor
     */
    public void setSuccessor(AbstractHandler successor) {
        this.successor = successor;
    }

    /**
     * 处理请求的抽象方法
     *
     * @param request
     */
    public abstract void handleRequest(int request);
}
